package com.codebattery.config;

import com.codebattery.util.OssUtil;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Component;

/**
 * @Author cay91
 * @Date 2020-08-27 11:12 PM
 * @Version 1.0
 */

@Data
@Component
public class OssConfig extends OssUtilBaseConfig {
    @Value("${oss.endpoint}")
    String endpoint;
    @Value("${oss.accessKeyId}")
    String accessKeyId;
    @Value("${oss.accessKeySecret}")
    String accessKeySecret;
    @Value("${oss.bucketName}")
    String bucketName;

    @Bean
    public OssUtil ossUtil(){
        return new OssUtil(this);
    }
}
